﻿using System.Web;
using Inovout.Membership.Security.OAuth.AuthorizationServer;
using Inovout.Web;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
using Microsoft.Owin.Security;
using System;


namespace Inovout.Membership.Account.WebPage
{
    public class MvcApplication : HttpApplication
    {

      
    }


    public class AccountApplication : IApplicationConfiguration
    {
        public void Configure(IAppBuilder app)
        {

            // Enable Application Sign In Cookie
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "Application",
                LoginPath = new PathString("/Account/Mail"),
            });     
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "Forms",
                LoginPath = new PathString("/Account/Forms")
            });

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "Inovout",
                LoginPath = new PathString("/Account/DynamicPassword")
            });

           
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "DynamicPassword",
                LoginPath = new PathString("/Account/DynamicPassword")
            });
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "Mail",
                LoginPath = new PathString("/Account/Mail")
            });
            

            app.UseAuthorizationServer();
        }
    }
}
